package com.util.sql.test;

import com.entity.User;
import com.util.sql.BaseDao;

import java.util.List;

public class UserImpl extends BaseDao<User> {
    public static void main(String[] args) {
        UserImpl user = new UserImpl();
        User u = new User();
        u.setMail("huahaulvlv");
        u.setPassword("huahuahau");
        u.setAccount("hehehehhe");
        u.setNickname("老子是天才吼吼");

        //System.out.println(user.get(u));
        System.out.println(user.save(u));
        u = user.get(u);
       User u2 = u;

        System.out.println(user.update(u,u2));
        System.out.println(user.get(u2));
        User u3 = new User();

        System.out.println(user.getList(u3));
        List<User> list = user.getList(u3);
        for(User l2:list){
            System.out.println(l2);
        }


    }
}
